<Query Kind="Program">
  <Reference>&lt;ProgramFilesX86&gt;\Microsoft Reactive Extensions SDK\v1.0.10621\Binaries\.NETFramework\v4.0\System.Reactive.dll</Reference>
  <Namespace>System.Reactive.Linq</Namespace>
  <Namespace>System.Reactive.Concurrency</Namespace>
  <Namespace>System.Reactive</Namespace>
</Query>

void Main()
{
	Console.WriteLine ("Thread {0}", Thread.CurrentThread.ManagedThreadId);
	var query = from number in Enumerable.Range(1,10)
				select number;
	var observableQuery = query.ToObservable();
	observableQuery.Subscribe(n=>ProcessNumber(n), ImDone);
	observableQuery = query.ToObservable(Scheduler.NewThread);
	var observer = Observer.Create<int>(ProcessNumber);
	ImDone();
}

static void ImDone()
{
	Console.WriteLine ("I'm done");
}

static void ProcessNumber(int number)
{
	Console.WriteLine ("{0} on Thread {1}", number, Thread.CurrentThread.ManagedThreadId);
}